﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuanLyThuVien.Business;
using System.Windows.Forms;

namespace QuanLyThuVien.DataAccess
{
    class TacGia_DauSachDAL
    {
        clsDatabase db = new clsDatabase();

        public void ThemMoiDauSach(TacGia_DauSach TGDS)
        {
            db.ThuThiSQL("insert into tbDS_TG values(N'"+TGDS.MaDS+"',N'"+TGDS.MaTG+"')");
        }

        public bool KiemTraDL(string maDS, string MaTG)
        {
            return db.KiemTra("select count(*) from tbDS_TG where MaDauSach=N'" + maDS + "'and MaTG=N'"+MaTG+"'");
        }
    }
}
